<div class="content-wrapper">

    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>

        <h1 class="pull-right">
            <?php echo $this->HelpUrl('printTemplate'); ?>
        </h1>

    </section>

    <section class="content">
        <?php echo $this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-md-12">
                <div class="box erp-box">
                        <div class="box-body table-responsive no-padding">
                            <table class="table table-hover">
                                <thead>
                                <tr class="erp-bg-thead">
                                    <th><?php echo $this->translate('名称'); ?></th>
                                    <th style="width: 18%"><?php echo $this->translate('状态'); ?></th>
                                    <th style="width: 15%"><?php echo $this->translate('操作'); ?></th>
                                </tr>
                                </thead>

                                <?php if($this->printTemplateList) foreach ($this->printTemplateList as $value) { ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($value->getTemplateTitle()); ?></td>
                                        <td><?php echo $value->getTemplateState() == 1 ? $this->translate('启用') : '<label class="text-danger">'.$this->translate('禁用').'</label>'?></td>
                                        <td>
                                            <a href="<?php echo $this->url('print-template', ['action' => 'edit', 'id' => $value->getTemplateCode()]); ?>" class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('设置'); ?></a>
                                        </td>
                                    </tr>
                                <?php } ?>
                            </table>

                        </div>
                    </form>
                </div>

            </div>
        </div>

    </section>
</div>